package com.thb.pay.api.sys.fallback;

import com.thb.pay.api.sys.SysResourceServiceApi;
import com.thb.pay.api.sys.vo.req.SysResourcePageReq;
import com.thb.pay.api.sys.vo.req.SysResourceReq;
import com.thb.pay.api.sys.vo.resp.SysResourceVo;
import com.thb.pay.core.utils.PageResult;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Slf4j
@Component
public class SysResourceServiceApiFallbackFactory implements FallbackFactory<SysResourceServiceApi> {


    @Override
    public SysResourceServiceApi create(Throwable throwable) {
        return new SysResourceServiceApi() {
            @Override
            public PageResult<SysResourceVo> findPage(@RequestBody SysResourcePageReq pageReq) {
                return null;
            }

            @Override
            public List<SysResourceVo> findListByParentId(@RequestParam("parentId") Long parentId) {
                return null;
            }

            @Override
            public List<SysResourceVo> findListBySystemType(@RequestParam("systemType") Integer systemType) {
                return null;
            }

            @Override
            public SysResourceVo getByPermissionCode(@RequestParam("code") String code) {
                return null;
            }

            @Override
            public SysResourceVo getById(Long id) {
                return null;
            }

            @Override
            public void save(@RequestBody SysResourceReq resourceReq) {

            }

            @Override
            public void update(@RequestBody SysResourceReq resourceReq) {

            }

            @Override
            public void deleteBatchResourceIds(@RequestBody List<Long> resourceIds) {

            }

            @Override
            public List<SysResourceVo> findListByUserId(@RequestParam("userId") Long userId) {
                return null;
            }

            @Override
            public List<SysResourceVo> findListByRoleIds(List<Long> roleIds) {
                return null;
            }
        };
    }
}